/******************************************************************************
 * * audio_global.h - data structure for audio module
 *
 * *(C) Copyright 2019 Asr International Ltd.
 * * All Rights Reserved
 * ******************************************************************************/
#ifndef AUDIO_GLOBAL_H
#define AUDIO_GLOBAL_H

#ifdef __cplusplus
extern "C" {
#endif

/* include header file */
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "ui_type.h"
#include "ui_textid.h"
#include "modem/mmi_modemadp_interface.h"
#include "ui_nvm_interface.h"
#include "inter_common_ui_interface.h"
#include "inter_framework_alarm_interface.h"
#include "inter_alarm_calendar_interface.h"
#include "inter_framework_interface.h"
#include "inter_setting_interface.h"
#include "nav.h"
#include "../../../lvgl/hal/hal.h"
#include "../../../lvgl/hal/hal_bt.h"
#include "utility.h"

/**********************
*      TYPEDEFS
**********************/
/* File attribute bits for directory entry (for ui used)*/
#define AUDIO_FILE_DIR    0x10    /* Directory */
#define AUDIO_FILE_ARC    0x20    /* Archive, normal file */
#define AUDIO_FILE_HID    0x40    /* Hidden, hide(or system) dir(or file) */
#define AUDIO_PATH_MAX    260
#define AUDIO_EXT_NAME    "mp3"
#define AUDIO_EXT_NAME_SUB    "MP3"
#ifndef BUILD_IN_PC_SIMULATOR
#define AUDIO_ROOT_PATH   "D:\\*"
#else
#define AUDIO_ROOT_PATH   "C:/*"
#endif
#ifndef BUILD_IN_PC_SIMULATOR
#define ADUIO_FILE_SYSTEM_PATH  "D:\\audio_list.nv"
#else
#define ADUIO_FILE_SYSTEM_PATH  "C:/audio_list.nv"
#endif
#define AUDIO_CURRENT_INDEX_INVALID 0XFFFFFFFF
#define AUDIO_SD_MOUNTED_AS_U_STORAGE -1
/**********************
* GLOBAL VARIABLES
**********************/

/**********************
* GLOBAL PROTOTYPES
**********************/
typedef struct {
    char path[AUDIO_PATH_MAX];
    char filename[AUDIO_PATH_MAX];
} audio_info_t;

typedef struct
{
    VOID         *pChart;
    VOID         *pSettingChart;
    VOID         *pAllSongsChart;
    UINT32       ChartIndex;
} Audio_Player_Global_Ctrl_t;

extern INT8 *UI_Lang_Get_Text_ById(UINT16 TxtId);

#ifdef __cplusplus
} /* extern "C" */
#endif

#endif /* AUDIO_GLOBAL_H */
